package com.ruoyi.module.memberInvestmentMessage.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.module.memberInvestmentMessage.mapper.MemberInvestmentMessageMapper;
import com.ruoyi.module.memberInvestmentMessage.domain.MemberInvestmentMessage;
import com.ruoyi.module.memberInvestmentMessage.service.IMemberInvestmentMessageService;

/**
 * 协会招商留言Service业务层处理
 * 
 * @author yqq
 * @date 2024-07-17
 */
@Service
public class MemberInvestmentMessageServiceImpl implements IMemberInvestmentMessageService 
{
    @Autowired
    private MemberInvestmentMessageMapper memberInvestmentMessageMapper;

    /**
     * 查询协会招商留言
     * 
     * @param messageId 协会招商留言主键
     * @return 协会招商留言
     */
    @Override
    public MemberInvestmentMessage selectMemberInvestmentMessageByMessageId(Long messageId)
    {
        return memberInvestmentMessageMapper.selectMemberInvestmentMessageByMessageId(messageId);
    }

    /**
     * 查询协会招商留言列表
     * 
     * @param memberInvestmentMessage 协会招商留言
     * @return 协会招商留言
     */
    @Override
    public List<MemberInvestmentMessage> selectMemberInvestmentMessageList(MemberInvestmentMessage memberInvestmentMessage)
    {
        return memberInvestmentMessageMapper.selectMemberInvestmentMessageList(memberInvestmentMessage);
    }

    /**
     * 新增协会招商留言
     * 
     * @param memberInvestmentMessage 协会招商留言
     * @return 结果
     */
    @Override
    public int insertMemberInvestmentMessage(MemberInvestmentMessage memberInvestmentMessage)
    {
        memberInvestmentMessage.setCreateTime(DateUtils.getNowDate());
        return memberInvestmentMessageMapper.insertMemberInvestmentMessage(memberInvestmentMessage);
    }

    /**
     * 修改协会招商留言
     * 
     * @param memberInvestmentMessage 协会招商留言
     * @return 结果
     */
    @Override
    public int updateMemberInvestmentMessage(MemberInvestmentMessage memberInvestmentMessage)
    {
        memberInvestmentMessage.setUpdateTime(DateUtils.getNowDate());
        return memberInvestmentMessageMapper.updateMemberInvestmentMessage(memberInvestmentMessage);
    }

    /**
     * 批量删除协会招商留言
     * 
     * @param messageIds 需要删除的协会招商留言主键
     * @return 结果
     */
    @Override
    public int deleteMemberInvestmentMessageByMessageIds(Long[] messageIds)
    {
        return memberInvestmentMessageMapper.deleteMemberInvestmentMessageByMessageIds(messageIds);
    }

    /**
     * 删除协会招商留言信息
     * 
     * @param messageId 协会招商留言主键
     * @return 结果
     */
    @Override
    public int deleteMemberInvestmentMessageByMessageId(Long messageId)
    {
        return memberInvestmentMessageMapper.deleteMemberInvestmentMessageByMessageId(messageId);
    }
}
